home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 02 - 1986 / 02.07 Jul 86.sit / 02.07 Jul 86 / window demo source / wind.c < prev    next >
MacBinary  |  1986-06-09  |  4.1 KB  |  [TEXT/EDIT]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Jun 9 01:23:24 1986, modified Mon Jun 9 01:23:24 1986, creator Macintosh Edit, type ASCII, 3660 bytes "wind.c" , at 0xecc 348 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-4K) default (weak)
16% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[EDIT]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 77 69 6e 64 2e 63 | 00 00 00 00 00 00 00 00 |..wind.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 45 44 49 | 54 01 00 00 00 00 00 00 |.TEXTEDI|T.......|
|00000050| 00 00 00 00 00 0e 4c 00 | 00 01 5c 9b 10 18 cc 9b |......L.|..\.....|
|00000060| 10 18 cc 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 bc 5c 00 00 |........|.....\..|
|00000080| 2f 2a 20 77 69 6e 64 6f | 77 20 6d 61 6e 61 67 65 |/* windo|w manage|
|00000090| 72 20 64 65 6d 6f 6e 73 | 74 72 61 74 69 6f 6e 20 |r demons|tration |
|000000a0| 0d 20 2a 20 62 61 73 65 | 20 6f 6e 20 70 72 6f 67 |. * base| on prog|
|000000b0| 72 61 6d 20 69 6e 20 0d | 20 2a 20 55 73 69 6e 67 |ram in .| * Using|
|000000c0| 20 4d 61 63 69 6e 74 6f | 73 68 20 54 6f 6f 6c 62 | Macinto|sh Toolb|
|000000d0| 6f 78 20 77 69 74 68 20 | 43 0d 20 2a 20 70 61 67 |ox with |C. * pag|
|000000e0| 65 20 37 30 0d 20 2a 2f | 0d 20 0d 20 2f 2a 20 48 |e 70. */|. . /* H|
|000000f0| 65 72 65 20 61 72 65 20 | 6f 75 72 20 69 6e 63 6c |ere are |our incl|
|00000100| 75 64 65 20 66 69 6c 65 | 73 20 2a 2f 0d 20 0d 20 |ude file|s */. . |
|00000110| 23 69 6e 63 6c 75 64 65 | 09 22 61 62 63 2e 68 22 |#include|."abc.h"|
|00000120| 09 09 2f 2a 20 4f 75 72 | 20 6f 77 6e 20 64 65 66 |../* Our| own def|
|00000130| 69 6e 65 73 20 2a 2f 0d | 20 23 69 6e 63 6c 75 64 |ines */.| #includ|
|00000140| 65 09 22 45 76 65 6e 74 | 73 2e 68 22 09 2f 2a 20 |e."Event|s.h"./* |
|00000150| 61 6c 73 6f 20 69 6e 63 | 6c 75 64 65 73 20 4d 61 |also inc|ludes Ma|
|00000160| 63 64 65 66 73 2e 68 20 | 2a 2f 0d 20 23 69 6e 63 |cdefs.h |*/. #inc|
|00000170| 6c 75 64 65 09 22 57 69 | 6e 64 6f 77 2e 68 22 09 |lude."Wi|ndow.h".|
|00000180| 2f 2a 20 61 6c 73 6f 20 | 69 6e 63 6c 75 64 65 73 |/* also |includes|
|00000190| 20 51 75 69 63 6b 64 72 | 61 77 2e 68 2c 20 77 68 | Quickdr|aw.h, wh|
|000001a0| 69 63 68 20 0d 20 09 09 | 09 09 09 09 09 09 20 09 |ich . ..|...... .|
|000001b0| 69 6e 20 74 75 72 6e 20 | 72 65 71 75 69 72 65 73 |in turn |requires|
|000001c0| 20 4d 36 38 4b 4c 49 42 | 2e 44 20 20 2a 2f 0d 20 | M68KLIB|.D */. |
|000001d0| 0d 20 2f 2a 20 48 65 72 | 65 20 61 72 65 20 6f 75 |. /* Her|e are ou|
|000001e0| 72 20 64 65 66 69 6e 65 | 73 20 2a 2f 0d 20 0d 20 |r define|s */. . |
|000001f0| 23 64 65 66 69 6e 65 09 | 09 53 63 72 65 65 6e 09 |#define.|.Screen.|
|00000200| 51 44 2d 3e 73 63 72 65 | 65 6e 42 69 74 73 2e 62 |QD->scre|enBits.b|
|00000210| 6f 75 6e 64 73 0d 20 23 | 64 65 66 69 6e 65 09 09 |ounds. #|define..|
|00000220| 63 68 61 72 43 6f 64 65 | 4d 61 73 6b 09 30 78 30 |charCode|Mask.0x0|
|00000230| 30 30 30 30 30 46 46 0d | 20 0d 20 2f 2a 20 48 65 |00000FF.| . /* He|
|00000240| 72 65 20 61 72 65 20 6f | 75 72 20 47 6c 6f 62 61 |re are o|ur Globa|
|00000250| 6c 20 76 61 72 69 61 62 | 6c 65 73 20 2a 2f 0d 20 |l variab|les */. |
|00000260| 0d 20 57 69 6e 64 6f 77 | 50 74 72 09 09 74 68 65 |. Window|Ptr..the|
|00000270| 57 69 6e 64 6f 77 3b 0d | 20 57 69 6e 64 6f 77 52 |Window;.| WindowR|
|00000280| 65 63 6f 72 64 09 77 69 | 6e 64 6f 77 52 65 63 3b |ecord.wi|ndowRec;|
|00000290| 0d 20 52 65 63 74 09 09 | 09 09 64 72 61 67 62 6f |. Rect..|..dragbo|
|000002a0| 75 6e 64 3b 0d 20 52 65 | 63 74 09 09 09 09 6c 69 |und;. Re|ct....li|
|000002b0| 6d 69 74 52 65 63 74 3b | 0d 20 0d 6d 61 69 6e 28 |mitRect;|. .main(|
|000002c0| 29 0d 7b 0d 09 49 6e 69 | 74 57 69 6e 64 6f 77 73 |).{..Ini|tWindows|
|000002d0| 28 29 3b 0d 09 49 6e 69 | 74 43 75 72 73 6f 72 28 |();..Ini|tCursor(|
|000002e0| 29 3b 0d 09 46 6c 75 73 | 68 45 76 65 6e 74 73 28 |);..Flus|hEvents(|
|000002f0| 65 76 65 72 79 45 76 65 | 6e 74 29 3b 0d 09 0d 09 |everyEve|nt);....|
|00000300| 2f 2a 20 49 6e 69 74 69 | 61 6c 69 7a 65 20 6f 75 |/* Initi|alize ou|
|00000310| 72 20 67 6c 6f 62 61 6c | 20 76 61 72 69 61 62 6c |r global| variabl|
|00000320| 65 73 20 2a 2f 0d 09 0d | 09 74 68 65 57 69 6e 64 |es */...|.theWind|
|00000330| 6f 77 20 3d 20 4e 69 6c | 3b 09 09 2f 2a 69 6e 64 |ow = Nil|;../*ind|
|00000340| 69 63 61 74 65 73 20 6e | 6f 20 77 69 6e 64 6f 77 |icates n|o window|
|00000350| 20 2a 2f 0d 09 53 65 74 | 52 65 63 74 28 26 64 72 | */..Set|Rect(&dr|
|00000360| 61 67 62 6f 75 6e 64 2c | 0d 09 09 09 09 53 63 72 |agbound,|.....Scr|
|00000370| 65 65 6e 2e 6c 65 66 74 | 20 2b 20 34 2c 0d 09 09 |een.left| + 4,...|
|00000380| 09 09 53 63 72 65 65 6e | 2e 74 6f 70 20 2b 20 32 |..Screen|.top + 2|
|00000390| 34 2c 0d 09 09 09 20 20 | 20 53 63 72 65 65 6e 2e |4,.... | Screen.|
|000003a0| 72 69 67 68 74 20 2d 20 | 34 2c 0d 09 09 09 09 53 |right - |4,.....S|
|000003b0| 63 72 65 65 6e 2e 62 6f | 74 74 6f 6d 20 2d 20 34 |creen.bo|ttom - 4|
|000003c0| 29 3b 0d 09 53 65 74 52 | 65 63 74 28 26 6c 69 6d |);..SetR|ect(&lim|
|000003d0| 69 74 52 65 63 74 2c 36 | 30 2c 34 30 2c 0d 09 09 |itRect,6|0,40,...|
|000003e0| 09 09 53 63 72 65 65 6e | 2e 72 69 67 68 74 20 2d |..Screen|.right -|
|000003f0| 20 53 63 72 65 65 6e 2e | 6c 65 66 74 20 2d 20 34 | Screen.|left - 4|
|00000400| 2c 0d 09 09 09 09 53 63 | 72 65 65 6e 2e 62 6f 74 |,.....Sc|reen.bot|
|00000410| 74 6f 6d 20 2d 20 53 63 | 72 65 65 6e 2e 74 6f 70 |tom - Sc|reen.top|
|00000420| 20 2d 20 32 34 29 3b 0d | 09 09 09 09 0d 09 64 6f | - 24);.|......do|
|00000430| 77 69 6e 64 6f 77 28 29 | 3b 09 09 09 09 2f 2a 20 |window()|;..../* |
|00000440| 6d 61 6b 65 20 6e 65 77 | 20 77 69 6e 64 6f 77 20 |make new| window |
|00000450| 2a 2f 20 20 0d 09 65 76 | 65 6e 74 6c 6f 6f 70 28 |*/ ..ev|entloop(|
|00000460| 29 3b 09 09 09 2f 2a 20 | 63 68 65 63 6b 20 66 6f |);.../* |check fo|
|00000470| 72 20 65 76 65 6e 74 73 | 20 2a 2f 0d 7d 0d 0d 64 |r events| */.}..d|
|00000480| 6f 77 69 6e 64 6f 77 28 | 29 0d 7b 0d 09 63 68 61 |owindow(|).{..cha|
|00000490| 72 09 09 2a 74 69 74 6c | 65 3b 09 09 09 2f 2a 20 |r..*titl|e;.../* |
|000004a0| 66 69 72 73 74 20 74 69 | 74 6c 65 20 66 6f 72 20 |first ti|tle for |
|000004b0| 77 69 6e 64 6f 77 20 2a | 2f 0d 09 52 65 63 74 09 |window *|/..Rect.|
|000004c0| 09 62 6f 75 6e 64 73 52 | 65 63 74 3b 0d 09 09 09 |.boundsR|ect;....|
|000004d0| 09 0d 09 69 66 20 28 6e | 6f 74 20 74 68 65 57 69 |...if (n|ot theWi|
|000004e0| 6e 64 6f 77 29 09 09 09 | 09 2f 2a 20 69 66 20 6e |ndow)...|./* if n|
|000004f0| 6f 20 77 69 6e 64 6f 77 | 20 65 78 69 73 74 73 2c |o window| exists,|
|00000500| 20 6d 61 6b 65 20 6f 6e | 65 20 2a 2f 0d 09 09 09 | make on|e */....|
|00000510| 7b 0d 09 09 09 74 69 74 | 6c 65 20 3d 20 22 41 42 |{....tit|le = "AB|
|00000520| 43 20 57 69 6e 64 6f 77 | 22 3b 0d 09 09 09 53 65 |C Window|";....Se|
|00000530| 74 52 65 63 74 28 26 62 | 6f 75 6e 64 73 52 65 63 |tRect(&b|oundsRec|
|00000540| 74 2c 35 30 2c 35 30 2c | 33 30 30 2c 31 35 30 29 |t,50,50,|300,150)|
|00000550| 3b 0d 09 09 09 74 68 65 | 57 69 6e 64 6f 77 20 3d |;....the|Window =|
|00000560| 20 4e 65 77 57 69 6e 64 | 6f 77 28 77 69 6e 64 6f | NewWind|ow(windo|
|00000570| 77 52 65 63 2c 20 26 62 | 6f 75 6e 64 73 52 65 63 |wRec, &b|oundsRec|
|00000580| 74 2c 0d 09 09 09 09 09 | 09 09 09 43 74 6f 50 73 |t,......|...CtoPs|
|00000590| 74 72 28 74 69 74 6c 65 | 29 2c 54 72 75 65 2c 64 |tr(title|),True,d|
|000005a0| 6f 63 75 6d 65 6e 74 50 | 72 6f 63 2c 0d 09 09 09 |ocumentP|roc,....|
|000005b0| 09 09 09 09 09 28 57 69 | 6e 64 6f 77 50 74 72 29 |.....(Wi|ndowPtr)|
|000005c0| 20 2d 31 2c 20 54 72 75 | 65 2c 20 30 29 3b 0d 09 | -1, Tru|e, 0);..|
|000005d0| 09 09 44 72 61 77 47 72 | 6f 77 49 63 6f 6e 28 74 |..DrawGr|owIcon(t|
|000005e0| 68 65 57 69 6e 64 6f 77 | 29 3b 0d 09 09 09 50 74 |heWindow|);....Pt|
|000005f0| 6f 43 73 74 72 28 74 69 | 74 6c 65 29 3b 0d 09 09 |oCstr(ti|tle);...|
|00000600| 09 7d 0d 7d 0d 0d 65 76 | 65 6e 74 6c 6f 6f 70 28 |.}.}..ev|entloop(|
|00000610| 29 0d 7b 0d 09 45 76 65 | 6e 74 52 65 63 6f 72 64 |).{..Eve|ntRecord|
|00000620| 09 09 74 68 65 45 76 65 | 6e 74 3b 0d 0d 09 77 68 |..theEve|nt;...wh|
|00000630| 69 6c 65 28 54 72 75 65 | 29 0d 09 09 69 66 20 28 |ile(True|)...if (|
|00000640| 47 65 74 4e 65 78 74 45 | 76 65 6e 74 28 65 76 65 |GetNextE|vent(eve|
|00000650| 72 79 45 76 65 6e 74 2c | 26 74 68 65 45 76 65 6e |ryEvent,|&theEven|
|00000660| 74 29 29 0d 09 09 09 73 | 77 69 74 63 68 28 74 68 |t))....s|witch(th|
|00000670| 65 45 76 65 6e 74 2e 77 | 68 61 74 29 09 09 09 09 |eEvent.w|hat)....|
|00000680| 09 0d 09 09 09 09 7b 09 | 09 09 09 09 09 2f 2a 20 |......{.|...../* |
|00000690| 6f 6e 6c 79 20 63 68 65 | 63 6b 20 6b 65 79 20 61 |only che|ck key a|
|000006a0| 6e 64 20 2a 2f 0d 09 09 | 09 09 63 61 73 65 20 6b |nd */...|..case k|
|000006b0| 65 79 44 6f 77 6e 3a 20 | 09 09 2f 2a 20 6d 6f 75 |eyDown: |../* mou|
|000006c0| 73 65 20 64 6f 77 6e 20 | 65 76 65 6e 74 73 20 2a |se down |events *|
|000006d0| 2f 0d 09 09 09 09 09 64 | 6f 6b 65 79 28 26 74 68 |/......d|okey(&th|
|000006e0| 65 45 76 65 6e 74 29 3b | 0d 09 09 09 09 09 62 72 |eEvent);|......br|
|000006f0| 65 61 6b 3b 0d 09 09 09 | 09 63 61 73 65 20 6d 6f |eak;....|.case mo|
|00000700| 75 73 65 44 6f 77 6e 3a | 0d 09 09 09 09 09 64 6f |useDown:|......do|
|00000710| 6d 6f 75 73 65 28 26 74 | 68 65 45 76 65 6e 74 29 |mouse(&t|heEvent)|
|00000720| 3b 0d 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |;......b|reak;...|
|00000730| 09 09 64 65 66 61 75 6c | 74 3a 0d 09 09 09 09 09 |..defaul|t:......|
|00000740| 62 72 65 61 6b 3b 0d 09 | 09 09 09 7d 0d 7d 0d 0d |break;..|...}.}..|
|00000750| 64 6f 6b 65 79 28 65 72 | 29 0d 09 45 76 65 6e 74 |dokey(er|)..Event|
|00000760| 52 65 63 6f 72 64 09 09 | 2a 65 72 3b 0d 7b 0d 09 |Record..|*er;.{..|
|00000770| 63 68 61 72 09 09 63 3b | 09 09 09 09 09 2f 2a 20 |char..c;|...../* |
|00000780| 63 68 61 72 61 63 74 65 | 72 20 66 72 6f 6d 20 6d |characte|r from m|
|00000790| 65 73 73 61 67 65 20 2a | 2f 0d 09 63 68 61 72 09 |essage *|/..char.|
|000007a0| 09 2a 74 69 74 6c 65 32 | 3b 09 09 09 2f 2a 20 73 |.*title2|;.../* s|
|000007b0| 65 63 6f 6e 64 20 74 69 | 74 6c 65 20 66 6f 72 20 |econd ti|tle for |
|000007c0| 77 69 6e 64 6f 77 20 2a | 2f 0d 09 0d 09 69 66 20 |window *|/....if |
|000007d0| 28 6e 6f 74 28 65 72 2d | 3e 6d 6f 64 69 66 69 65 |(not(er-|>modifie|
|000007e0| 72 73 20 26 20 63 6d 64 | 4b 65 79 29 29 09 09 2f |rs & cmd|Key))../|
|000007f0| 2a 20 6f 6e 6c 79 20 70 | 61 79 20 61 74 74 65 6e |* only p|ay atten|
|00000800| 74 69 6f 6e 20 74 6f 20 | 63 6d 64 20 6b 65 79 73 |tion to |cmd keys|
|00000810| 20 2a 2f 0d 09 09 72 65 | 74 75 72 6e 3b 09 09 09 | */...re|turn;...|
|00000820| 09 09 09 09 09 09 2f 2a | 20 69 66 20 63 6f 6d 6d |....../*| if comm|
|00000830| 61 6e 64 20 6b 65 79 20 | 69 73 20 64 6f 77 6e 20 |and key |is down |
|00000840| 2a 2f 0d 09 09 0d 09 63 | 20 3d 20 65 72 2d 3e 6d |*/.....c| = er->m|
|00000850| 65 73 73 61 67 65 20 26 | 20 63 68 61 72 43 6f 64 |essage &| charCod|
|00000860| 65 4d 61 73 6b 3b 09 09 | 2f 2a 20 65 78 74 72 61 |eMask;..|/* extra|
|00000870| 63 74 20 63 68 61 72 61 | 63 74 65 72 2c 20 6c 6f |ct chara|cter, lo|
|00000880| 77 65 72 20 38 20 62 69 | 74 73 20 2a 2f 0d 09 0d |wer 8 bi|ts */...|
|00000890| 09 69 66 20 28 63 20 65 | 71 75 61 6c 73 20 27 71 |.if (c e|quals 'q|
|000008a0| 27 20 6f 72 20 63 20 65 | 71 75 61 6c 73 20 27 51 |' or c e|quals 'Q|
|000008b0| 27 29 09 2f 2a 20 27 71 | 27 20 71 75 69 74 73 20 |')./* 'q|' quits |
|000008c0| 70 72 6f 67 72 61 6d 20 | 2a 2f 0d 09 09 45 78 69 |program |*/...Exi|
|000008d0| 74 54 6f 53 68 65 6c 6c | 28 29 3b 09 0d 09 0d 09 |tToShell|();.....|
|000008e0| 69 66 20 28 6e 6f 74 20 | 74 68 65 57 69 6e 64 6f |if (not |theWindo|
|000008f0| 77 29 0d 09 09 7b 0d 09 | 09 09 69 66 20 28 63 20 |w)...{..|..if (c |
|00000900| 65 71 75 61 6c 73 20 27 | 6d 27 20 6f 72 20 63 20 |equals '|m' or c |
|00000910| 65 71 75 61 6c 73 20 27 | 4d 27 29 0d 09 09 09 09 |equals '|M').....|
|00000920| 7b 0d 09 09 09 09 64 6f | 77 69 6e 64 6f 77 28 29 |{.....do|window()|
|00000930| 3b 0d 09 09 09 09 72 65 | 74 75 72 6e 3b 0d 09 09 |;.....re|turn;...|
|00000940| 09 09 7d 0d 09 09 09 65 | 6c 73 65 0d 09 09 09 09 |..}....e|lse.....|
|00000950| 7b 0d 09 09 09 09 53 79 | 73 42 65 65 70 28 31 29 |{.....Sy|sBeep(1)|
|00000960| 3b 0d 09 09 09 09 72 65 | 74 75 72 6e 3b 0d 09 09 |;.....re|turn;...|
|00000970| 09 09 7d 0d 09 09 7d 0d | 09 09 0d 09 09 2f 2a 20 |..}...}.|...../* |
|00000980| 48 61 76 65 20 61 20 77 | 69 6e 64 6f 77 2c 20 73 |Have a w|indow, s|
|00000990| 6f 20 74 72 79 20 63 6f | 6d 6d 61 6e 64 73 20 2a |o try co|mmands *|
|000009a0| 2f 0d 09 09 0d 09 09 73 | 77 69 74 63 68 20 28 63 |/......s|witch (c|
|000009b0| 29 0d 09 09 09 7b 0d 09 | 09 09 63 61 73 65 20 27 |)....{..|..case '|
|000009c0| 78 27 3a 0d 09 09 09 63 | 61 73 65 20 27 58 27 3a |x':....c|ase 'X':|
|000009d0| 0d 09 09 09 09 43 6c 6f | 73 65 57 69 6e 64 6f 77 |.....Clo|seWindow|
|000009e0| 28 74 68 65 57 69 6e 64 | 6f 77 29 3b 0d 09 09 09 |(theWind|ow);....|
|000009f0| 09 74 68 65 57 69 6e 64 | 6f 77 20 3d 20 4e 69 6c |.theWind|ow = Nil|
|00000a00| 3b 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |;.....br|eak;....|
|00000a10| 63 61 73 65 20 27 73 27 | 3a 0d 09 09 09 63 61 73 |case 's'|:....cas|
|00000a20| 65 20 27 53 27 3a 0d 09 | 09 09 09 53 68 6f 77 57 |e 'S':..|...ShowW|
|00000a30| 69 6e 64 6f 77 28 74 68 | 65 57 69 6e 64 6f 77 29 |indow(th|eWindow)|
|00000a40| 3b 0d 09 09 09 09 44 72 | 61 77 47 72 6f 77 49 63 |;.....Dr|awGrowIc|
|00000a50| 6f 6e 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |on(theWi|ndow);..|
|00000a60| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 63 61 73 |...break|;....cas|
|00000a70| 65 20 27 68 27 3a 0d 09 | 09 09 63 61 73 65 20 27 |e 'h':..|..case '|
|00000a80| 48 27 3a 0d 09 09 09 09 | 48 69 64 65 57 69 6e 64 |H':.....|HideWind|
|00000a90| 6f 77 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |ow(theWi|ndow);..|
|00000aa0| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 63 61 73 |...break|;....cas|
|00000ab0| 65 20 27 74 27 3a 0d 09 | 09 09 63 61 73 65 20 27 |e 't':..|..case '|
|00000ac0| 54 27 3a 0d 09 09 09 09 | 74 69 74 6c 65 32 20 3d |T':.....|title2 =|
|00000ad0| 20 22 41 20 44 69 66 66 | 65 72 65 6e 74 20 54 69 | "A Diff|erent Ti|
|00000ae0| 74 6c 65 22 3b 0d 09 09 | 09 09 53 65 74 57 54 69 |tle";...|..SetWTi|
|00000af0| 74 6c 65 28 74 68 65 57 | 69 6e 64 6f 77 2c 20 43 |tle(theW|indow, C|
|00000b00| 74 6f 50 73 74 72 28 74 | 69 74 6c 65 32 29 29 3b |toPstr(t|itle2));|
|00000b10| 0d 09 09 09 09 50 74 6f | 43 73 74 72 28 74 69 74 |.....Pto|Cstr(tit|
|00000b20| 6c 65 32 29 3b 0d 09 09 | 09 09 62 72 65 61 6b 3b |le2);...|..break;|
|00000b30| 0d 09 09 09 64 65 66 61 | 75 6c 74 3a 0d 09 09 09 |....defa|ult:....|
|00000b40| 09 53 79 73 42 65 65 70 | 28 31 29 3b 0d 09 09 09 |.SysBeep|(1);....|
|00000b50| 09 62 72 65 61 6b 3b 0d | 09 09 09 7d 0d 7d 0d 0d |.break;.|...}.}..|
|00000b60| 0d 64 6f 6d 6f 75 73 65 | 28 65 72 29 0d 09 45 76 |.domouse|(er)..Ev|
|00000b70| 65 6e 74 52 65 63 6f 72 | 64 09 2a 65 72 3b 0d 7b |entRecor|d.*er;.{|
|00000b80| 0d 09 73 68 6f 72 74 09 | 09 09 77 69 6e 64 6f 77 |..short.|..window|
|00000b90| 63 6f 64 65 3b 0d 09 57 | 69 6e 64 6f 77 50 74 72 |code;..W|indowPtr|
|00000ba0| 09 77 68 69 63 68 57 69 | 6e 64 6f 77 3b 0d 09 73 |.whichWi|ndow;..s|
|00000bb0| 68 6f 72 74 09 09 09 69 | 6e 67 6f 3b 0d 09 6c 6f |hort...i|ngo;..lo|
|00000bc0| 6e 67 09 09 09 73 69 7a | 65 3b 0d 09 0d 09 77 69 |ng...siz|e;....wi|
|00000bd0| 6e 64 6f 77 63 6f 64 65 | 20 3d 20 46 69 6e 64 57 |ndowcode| = FindW|
|00000be0| 69 6e 64 6f 77 28 26 65 | 72 2d 3e 77 68 65 72 65 |indow(&e|r->where|
|00000bf0| 2c 20 26 77 68 69 63 68 | 57 69 6e 64 6f 77 29 3b |, &which|Window);|
|00000c00| 0d 09 73 77 69 74 63 68 | 20 28 77 69 6e 64 6f 77 |..switch| (window|
|00000c10| 63 6f 64 65 29 0d 09 09 | 7b 0d 09 09 63 61 73 65 |code)...|{...case|
|00000c20| 20 69 6e 44 65 73 6b 3a | 0d 09 09 09 69 66 20 28 | inDesk:|....if (|
|00000c30| 74 68 65 57 69 6e 64 6f | 77 20 6e 6f 74 65 71 75 |theWindo|w notequ|
|00000c40| 61 6c 20 30 29 0d 09 09 | 09 09 7b 0d 09 09 09 09 |al 0)...|..{.....|
|00000c50| 48 69 6c 69 74 65 57 69 | 6e 64 6f 77 28 74 68 65 |HiliteWi|ndow(the|
|00000c60| 57 69 6e 64 6f 77 2c 20 | 46 61 6c 73 65 29 3b 0d |Window, |False);.|
|00000c70| 09 09 09 09 44 72 61 77 | 47 72 6f 77 49 63 6f 6e |....Draw|GrowIcon|
|00000c80| 28 74 68 65 57 69 6e 64 | 6f 77 29 3b 0d 09 09 09 |(theWind|ow);....|
|00000c90| 09 7d 0d 09 09 09 65 6c | 73 65 0d 09 09 09 09 45 |.}....el|se.....E|
|00000ca0| 78 69 74 54 6f 53 68 65 | 6c 6c 28 29 3b 09 2f 2a |xitToShe|ll();./*|
|00000cb0| 20 61 6c 6c 6f 77 20 61 | 6e 20 65 78 69 74 20 69 | allow a|n exit i|
|00000cc0| 66 20 6e 6f 20 77 69 6e | 64 6f 77 20 2a 2f 0d 09 |f no win|dow */..|
|00000cd0| 09 09 62 72 65 61 6b 3b | 0d 09 09 63 61 73 65 20 |..break;|...case |
|00000ce0| 69 6e 4d 65 6e 75 42 61 | 72 3a 0d 09 09 09 53 79 |inMenuBa|r:....Sy|
|00000cf0| 73 42 65 65 70 28 31 29 | 3b 0d 09 09 09 62 72 65 |sBeep(1)|;....bre|
|00000d00| 61 6b 3b 0d 09 09 63 61 | 73 65 20 69 6e 53 79 73 |ak;...ca|se inSys|
|00000d10| 57 69 6e 64 6f 77 3a 0d | 09 09 09 53 79 73 42 65 |Window:.|...SysBe|
|00000d20| 65 70 28 31 29 3b 0d 09 | 09 09 62 72 65 61 6b 3b |ep(1);..|..break;|
|00000d30| 0d 09 09 63 61 73 65 20 | 69 6e 43 6f 6e 74 65 6e |...case |inConten|
|00000d40| 74 3a 0d 09 09 09 48 69 | 6c 69 74 65 57 69 6e 64 |t:....Hi|liteWind|
|00000d50| 6f 77 28 77 68 69 63 68 | 57 69 6e 64 6f 77 2c 54 |ow(which|Window,T|
|00000d60| 72 75 65 29 3b 0d 09 09 | 09 44 72 61 77 47 72 6f |rue);...|.DrawGro|
|00000d70| 77 49 63 6f 6e 28 74 68 | 65 57 69 6e 64 6f 77 29 |wIcon(th|eWindow)|
|00000d80| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|00000d90| 73 65 20 69 6e 44 72 61 | 67 3a 0d 09 09 09 44 72 |se inDra|g:....Dr|
|00000da0| 61 67 57 69 6e 64 6f 77 | 28 77 68 69 63 68 57 69 |agWindow|(whichWi|
|00000db0| 6e 64 6f 77 2c 20 26 65 | 72 2d 3e 77 68 65 72 65 |ndow, &e|r->where|
|00000dc0| 2c 20 26 64 72 61 67 62 | 6f 75 6e 64 29 3b 0d 09 |, &dragb|ound);..|
|00000dd0| 09 09 44 72 61 77 47 72 | 6f 77 49 63 6f 6e 28 74 |..DrawGr|owIcon(t|
|00000de0| 68 65 57 69 6e 64 6f 77 | 29 3b 0d 09 09 09 62 72 |heWindow|);....br|
|00000df0| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 69 6e 47 72 |eak;...c|ase inGr|
|00000e00| 6f 77 3a 0d 09 09 09 2f | 2a 20 6e 6f 74 20 69 6e |ow:..../|* not in|
|00000e10| 63 6c 75 64 65 64 20 74 | 68 69 73 20 6d 6f 6e 74 |cluded t|his mont|
|00000e20| 68 20 2a 2f 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |h */....|break;..|
|00000e30| 09 63 61 73 65 20 69 6e | 47 6f 41 77 61 79 3a 0d |.case in|GoAway:.|
|00000e40| 09 09 09 69 6e 67 6f 20 | 3d 20 54 72 61 63 6b 47 |...ingo |= TrackG|
|00000e50| 6f 41 77 61 79 28 77 68 | 69 63 68 57 69 6e 64 6f |oAway(wh|ichWindo|
|00000e60| 77 2c 26 65 72 2d 3e 77 | 68 65 72 65 29 3b 0d 09 |w,&er->w|here);..|
|00000e70| 09 09 69 66 20 28 69 6e | 67 6f 29 0d 09 09 09 09 |..if (in|go).....|
|00000e80| 7b 0d 09 09 09 09 43 6c | 6f 73 65 57 69 6e 64 6f |{.....Cl|oseWindo|
|00000e90| 77 28 77 68 69 63 68 57 | 69 6e 64 6f 77 29 3b 0d |w(whichW|indow);.|
|00000ea0| 09 09 09 09 74 68 65 57 | 69 6e 64 6f 77 20 3d 20 |....theW|indow = |
|00000eb0| 4e 69 6c 3b 0d 09 09 09 | 09 7d 0d 09 09 09 62 72 |Nil;....|.}....br|
|00000ec0| 65 61 6b 3b 0d 09 09 7d | 0d 7d 0d 0d 00 00 00 00 |eak;...}|.}......|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 00 01 00 00 00 01 16 | 00 00 00 16 00 00 00 46 |........|.......F|
|00000f10| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00000f20| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00000f30| 06 77 69 6e 64 2e 63 77 | 02 00 00 00 54 45 58 54 |.wind.cw|....TEXT|
|00000f40| 45 44 49 54 01 00 00 37 | 00 02 00 00 00 01 ac 6f |EDIT...7|.......o|
|00000f50| 00 00 54 45 58 54 45 44 | 49 54 01 00 00 37 00 02 |..TEXTED|IT...7..|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 9a fb 1c d6 00 00 | 0e 4c 00 00 01 5c e5 e5 |........|.L...\..|
|00000f80| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00000f90| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00000fa0| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00000fb0| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00000fc0| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00000fd0| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00000fe0| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00000ff0| e5 e5 e5 e5 e5 e5 e5 e5 | e5 e5 e5 e5 e5 e5 e5 e5 |........|........|
|00001000| 00 00 00 0a 00 09 06 4d | 6f 6e 61 63 6f 00 00 00 |.......M|onaco...|
|00001010| 00 04 00 06 00 03 00 00 | 01 00 00 00 01 16 00 00 |........|........|
|00001020| 00 16 00 00 00 46 00 00 | cc 24 02 f2 00 00 00 1c |.....F..|.$......|
|00001030| 00 46 00 01 45 46 4e 54 | 00 00 00 12 45 54 41 42 |.F..EFNT|....ETAB|
|00001040| 00 00 00 1e 03 eb ff ff | 00 00 00 00 00 01 6d 1a |........|......m.|
|00001050| 03 ec ff ff 00 00 00 0e | 00 01 6f 2e 00 00 00 00 |........|..o.....|
|00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+